<?php

class Timer
{
	public $start;
 
	function __construct($autostart = FALSE)
	{
		if ($autostart) $this->start();
	}
 
	function start()
	{
		$this->start = microtime(true);
	}
 
	function stop()
	{
		$interval = round((microtime(true) - $this->start), 2);
		return $interval;
	}
}